package com.hdu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.hdu.entity.Major;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 专业实体类 Mapper 接口
 * </p>
 *
 * @author xiaobai
 * @since 2023-11-05
 */
public interface MajorMapper extends BaseMapper<Major>, MPJBaseMapper<Major> {

    @Select("select type from major where id in (select major_id from school_major where school_id=#{id}) group by type")
    List<String> specialType(String id);
}
